package com.zackeus.sipservice.constant;

import androidx.annotation.StringDef;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 音频编解码器
 * @name: Codec
 * @author: zz
 * @date: 2022/9/16
 */
public final class AudioCodec {

    public static final String OPUS = "OPUS";

    public static final String PCMA_8000 = "PCMA/8000";
    public static final String PCMU_8000 = "PCMU/8000";
    public static final String G729_8000 = "G729/8000";

    public static final String SPEEX_8000 = "speex/8000";
    public static final String SPEEX_16000 = "speex/16000";
    public static final String SPEEX_32000 = "speex/32000";
    public static final String GSM_8000 = "GSM/8000";
    public static final String G722_16000 = "G722/16000";
    public static final String G7221_16000 = "G7221/16000";
    public static final String G7221_32000 = "G7221/32000";

    public static final String ILBC_8000 = "ilbc/8000";
    public static final String AMR_8000 = "AMR/8000";
    public static final String AMR_WB_16000 = "AMR-WB/16000";

    @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
    @Retention(RetentionPolicy.SOURCE)
    @StringDef({OPUS, PCMA_8000, PCMU_8000, G729_8000, SPEEX_8000, SPEEX_16000, SPEEX_32000,
            GSM_8000, G722_16000, G7221_16000, G7221_32000, ILBC_8000, AMR_8000, AMR_WB_16000})
    public @interface Unit {}
}
